Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create (unstable) 2024 edition #94461

Merged
merged 1 commit into from
Apr 15, 2022
Merged

Create (unstable) 2024 edition #94461

merged 1 commit into from
Apr 15, 2022

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Feb 28, 2022

On Zulip, there was a small aside regarding creating the 2024 edition now as opposed to later. There was a reasonable amount of support and no stated opposition.

This change creates the 2024 edition in the compiler and creates a prelude for the 2024 edition. There is no current difference between the 2021 and 2024 editions. Cargo and other tools will need to be updated separately, as it's not in the same repository. This change permits the vast majority of work towards the next edition to proceed now instead of waiting until 2024.

For sanity purposes, I've merged the "hello" UI tests into a single file with multiple revisions. Otherwise we'd end up with a file per edition, despite them being essentially identical.

@rustbot label +T-lang +S-waiting-on-review

Not sure on the relevant team, to be honest.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 28, 2022
@rust-highfive
Copy link
Collaborator

Some changes occurred in src/tools/rustfmt.

cc @calebcartwright

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Feb 28, 2022
@rust-highfive
Copy link
Collaborator

r? @michaelwoerister

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-log-analyzer

This comment has been minimized.

@michaelwoerister
Copy link
Member

Thanks for the PR, @jhpratt! I'll assign to one of our compiler team leads as I don't have the required context here.
r? @pnkfelix

@bors
Copy link
Contributor

bors commented Apr 1, 2022

☔ The latest upstream changes (presumably #95552) made this pull request unmergeable. Please resolve the merge conflicts.

@jhpratt
Copy link
Member Author

jhpratt commented Apr 2, 2022

Rebased.

@@ -1033,7 +1033,7 @@ fn check_matcher_core(
err.span_label(sp, format!("not allowed after `{}` fragments", kind));

if kind == NonterminalKind::PatWithOr
&& sess.edition == Edition::Edition2021
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

@pnkfelix
Copy link
Member

pnkfelix commented Apr 14, 2022

@bors r+

Based on discussion at https://zulip-archive.rust-lang.org/stream/213817-t-lang/topic/Deprecating.20macro.20scoping.20shenanigans.html#272860652 , there was support for this idea from @scottmcm , @joshtriplett , and @yaahc. I support it as well, and I think the people listed above represent enough of leadership to let this through in an unstable fashion.

(The other approach would be to go through a formal T-compiler MCP to propose this as the official policy going forward. I'll at least mention this PR in the T-compiler meeting today, so people are aware that I unilaterally approved it.)

@bors
Copy link
Contributor

bors commented Apr 14, 2022

📌 Commit 6b75406 has been approved by pnkfelix

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 14, 2022
@pnkfelix pnkfelix changed the title Create 2024 edition Create (unstable) 2024 edition Apr 14, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 14, 2022
Create (unstable) 2024 edition

[On Zulip](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Deprecating.20macro.20scoping.20shenanigans/near/272860652), there was a small aside regarding creating the 2024 edition now as opposed to later. There was a reasonable amount of support and no stated opposition.

This change creates the 2024 edition in the compiler and creates a prelude for the 2024 edition. There is no current difference between the 2021 and 2024 editions. Cargo and other tools will need to be updated separately, as it's not in the same repository. This change permits the vast majority of work towards the next edition to proceed _now_ instead of waiting until 2024.

For sanity purposes, I've merged the "hello" UI tests into a single file with multiple revisions. Otherwise we'd end up with a file per edition, despite them being essentially identical.

`@rustbot` label +T-lang +S-waiting-on-review

Not sure on the relevant team, to be honest.
fee1-dead added a commit to fee1-dead-contrib/rust that referenced this pull request Apr 15, 2022
Create (unstable) 2024 edition

[On Zulip](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Deprecating.20macro.20scoping.20shenanigans/near/272860652), there was a small aside regarding creating the 2024 edition now as opposed to later. There was a reasonable amount of support and no stated opposition.

This change creates the 2024 edition in the compiler and creates a prelude for the 2024 edition. There is no current difference between the 2021 and 2024 editions. Cargo and other tools will need to be updated separately, as it's not in the same repository. This change permits the vast majority of work towards the next edition to proceed _now_ instead of waiting until 2024.

For sanity purposes, I've merged the "hello" UI tests into a single file with multiple revisions. Otherwise we'd end up with a file per edition, despite them being essentially identical.

``@rustbot`` label +T-lang +S-waiting-on-review

Not sure on the relevant team, to be honest.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 15, 2022
Create (unstable) 2024 edition

[On Zulip](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Deprecating.20macro.20scoping.20shenanigans/near/272860652), there was a small aside regarding creating the 2024 edition now as opposed to later. There was a reasonable amount of support and no stated opposition.

This change creates the 2024 edition in the compiler and creates a prelude for the 2024 edition. There is no current difference between the 2021 and 2024 editions. Cargo and other tools will need to be updated separately, as it's not in the same repository. This change permits the vast majority of work towards the next edition to proceed _now_ instead of waiting until 2024.

For sanity purposes, I've merged the "hello" UI tests into a single file with multiple revisions. Otherwise we'd end up with a file per edition, despite them being essentially identical.

```@rustbot``` label +T-lang +S-waiting-on-review

Not sure on the relevant team, to be honest.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 15, 2022
Rollup of 11 pull requests

Successful merges:

 - rust-lang#94457 (Stabilize `derive_default_enum`)
 - rust-lang#94461 (Create (unstable) 2024 edition)
 - rust-lang#94849 (Check var scope if it exist)
 - rust-lang#95194 (remove find_use_placement)
 - rust-lang#95749 (only downgrade selection Error -> Ambiguous if type error is in predicate)
 - rust-lang#96026 (couple of clippy::complexity fixes)
 - rust-lang#96027 (remove function parameters only used in recursion)
 - rust-lang#96034 ([test] Add test cases of untested functions for BTreeSet )
 - rust-lang#96040 (Use u32 instead of i32 for futexes.)
 - rust-lang#96062 (docs: Update tests chapter for Termination stabilization)
 - rust-lang#96065 (Refactor: Use `format-args-capture` and remove unnecessary nested blocks in rustc_typeck)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 20bf34f into rust-lang:master Apr 15, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 15, 2022
@jhpratt jhpratt deleted the 2024-edition branch April 15, 2022 21:17
calebcartwright pushed a commit to calebcartwright/rust that referenced this pull request Jun 13, 2022
Create (unstable) 2024 edition

[On Zulip](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Deprecating.20macro.20scoping.20shenanigans/near/272860652), there was a small aside regarding creating the 2024 edition now as opposed to later. There was a reasonable amount of support and no stated opposition.

This change creates the 2024 edition in the compiler and creates a prelude for the 2024 edition. There is no current difference between the 2021 and 2024 editions. Cargo and other tools will need to be updated separately, as it's not in the same repository. This change permits the vast majority of work towards the next edition to proceed _now_ instead of waiting until 2024.

For sanity purposes, I've merged the "hello" UI tests into a single file with multiple revisions. Otherwise we'd end up with a file per edition, despite them being essentially identical.

````@rustbot```` label +T-lang +S-waiting-on-review

Not sure on the relevant team, to be honest.
bors added a commit to rust-lang/cargo that referenced this pull request Oct 4, 2023
feat: Add `Edition2024`

[RFC for `Edition2024`](rust-lang/rfcs#3501).  While the RFC is not yet merged, this follows rustc which added the 2024 edition previously in rust-lang/rust#94461

This PR adds `Edition2024` as a possible value for `edition = "xxxx"`. I did this by following the [guide here](https://github.com/rust-lang/cargo/blob/ed0a7873107f48079a424da2920f7d434fd22fdc/src/cargo/core/features.rs#L163-L174).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants